package org.se.scut.pinserver.main;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;


public class CreateTable {
	private static SessionFactory sessionFactory;

	public static void beforeClass() {
		sessionFactory = new AnnotationConfiguration().configure()
				.buildSessionFactory();
	}

	public static void afterClass() {
		sessionFactory.close();
	}

	public static void testSchemaExport() {
		new SchemaExport(new AnnotationConfiguration().configure()).create(
				false, true);

	}

	public static void main(String[] args) {
		beforeClass();
		testSchemaExport();
	}
}
